<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <title>编辑广告模板信息</title>
    <#include "/view/admin/head.html"/>
            <script type="text/javascript" src="${base}/jstool/bootstrap-fileinput/js/fileinput.js"></script>
            <script type="text/javascript" src="${base}/jstool/bootstrap-fileinput/js/locals/zh.js"></script>
            <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-fileinput/css/fileinput.min.css" />
            <script type="text/javascript" src="${base}/jstool/bootstrap-switch/bootstrap-switch.min.js"></script>
            <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-switch/bootstrap-switch.min.css" />
            <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
            <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
            <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />


    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/js/bootstrapValidator.min.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-validator-0.5.3/lang/zh_CN.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-validator-0.5.3/css/bootstrapValidator.min.css" />


    <style type="text/css">
        .list-path {
            height: 50px;
            line-height: 50px;
            background-color: #9acfea;
        }

        .table-class {
            width: 90%;
            text-align: center;
            border: 1px solid #afd9ee;
            margin: 0 auto;
            margin-top: 50px;
        }

        table th {
            width: 20%;
            background-color: #d9edf7;
            text-align: right;
        }

        table td {
            width: 20%;
            text-align: left;
        }


    </style>
    <script type="text/javascript">

        $(function(){
            //初始化




                $('#picPath').fileinput({
                    language: 'zh', //设置语言
                    allowedFileExtensions : ['jpg', 'png','gif'],//接收的文件后缀
                    showUpload: false, //是否显示上传按钮
                    showCaption: false,//是否显示标题
                    browseClass: "btn btn-primary", //按钮样式
                    previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
                });
             
                    
                    

                    $('#picPath1').fileinput({
                        language: 'zh', //设置语言
                        allowedFileExtensions : ['jpg', 'png','gif'],//接收的文件后缀
                        showUpload: false, //是否显示上传按钮
                        showCaption: false,//是否显示标题
                        browseClass: "btn btn-primary", //按钮样式
                        previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
                    });
             



        });

    </script>
</head>
<body>

<div class="list-path">
		<span style="margin-left: 50px;"> <a
                href="${base}/shop/list.do"><span
                class="glyphicon glyphicon-home"></span> 广告模板列表</a> / 编辑/广告信息
		</span>
    <div style="float: right; margin-right: 40px;">
        <a class="btn btn-info"
           href="${base}/template/czjtemplateList">返回上一级</a>
    </div>
</div>


<div class="table-class">
    <#include "/view/admin/opermsg.html"/>
    <form id="shopForm" action="${base}/template/doupdate" name="form1"
     method="post" enctype="multipart/form-data" >
    <table class="table table-bordered">

                 <input type="hidden" style="display: none" name="templateId" value="${czjtemplate.templateId!}"/>

                <tr>
                <th>模板主题</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="templateName" name="templateName" placeholder="请输入模板主题" value="${czjtemplate.templateName!}">
                    </div>
                </td>
                

                
                <th>视频地址</th>
                <td>
                    <div class="form-group">
                        <input type="text" class="form-control" id="prices" name="videoUrl" placeholder="请输入视频地址" value="${czjtemplate.videoUrl!}">
                    </div>
                </td>
                </tr>

                <tr>
                <th>模板图片</th>
                <td>
                    <div class="form-group">
       <input type="file" class="form-control" id="picPath" name="file" >
                    </div>
                </td>
                <th>模板原图片</th>
                <td>
            <#if czjtemplate.picPath??>
                        <img src="${base}${czjtemplate.picPath!}" height="100px">
            </#if>

                </td>
                </tr>

    <tr>
                <th>模板背景图片</th>
                <td>
                    <div class="form-group">
     				 <input type="file" class="form-control" id="picPath1" name="file" >
                    </div>
                </td>
                

                
                <th>模板原背景图片</th>
                <td>
            <#if czjtemplate.backgroundPath??>
                        <img src="${base}${czjtemplate.backgroundPath!}" height="100px">
            </#if>

                    
                </td>
                </tr>

        <tr>
            <td colspan="4" width="100%" style="text-align: center;">
                <input type="button" onclick="aa()" class="btn btn-success " value="保存"/>
                <span style="width: 20px;">&nbsp;</span>
                <a class="btn btn-danger " href="javascript:window.history.go(-1)">
                   </span>返回</a>
            </td>
        </tr>

    </table>
</form>




</div>



</body>
</html>


<script type="text/javascript">

	function aa(){
		
		var picPath = $("#picPath").val();
		if(picPath !=""){
			$("#q").val("1");
		}
		var picPath1 = $("#picPath1").val();
		if(picPath1 !=""){
			$("#q1").val("1");
		}
		var picPath1 = $("#picPath1").val();
		document.form1.submit();
	}
</script>